package yl.hs.bmipfull.controllers.production;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import yl.hs.bmipfull.controllers.ControllerBase;
import yl.hs.bmipfull.service.production.IProductionLogService;
import yl.hs.bmipfull.viewmodels.WebResult;

/**
 * 作用:   <br/>
 * 创建时间: 2021-12-28 17:02 <br/>
 *
 * @author 吴高丰
 */
@Api(value = "日志信息Web接口", tags = "生产管理——日志信息操作")
@RequestMapping(value = "/api/product/log")
@RestController
public class ProductOrderSystemLogController extends ControllerBase {
    @Autowired
    IProductionLogService service;

    @ApiOperation(value = "查询包装信息", notes = "查询包装信息")
    @RequestMapping(value = "/{dataSN}", method = RequestMethod.GET)
    public WebResult queryList(@ApiParam(value = "数据编号") @PathVariable String dataSN) {
        try {
            return success("查询成功", service.queryByDataSn(dataSN));
        } catch (Exception e) {
            return error(e);
        }
    }
}
